
rm ./boot.bin -f
rm ./kernel*.o

nasm src/boot.asm -o boot.bin
nasm -f elf32 src/kernel.asm -o kernel2.o



gcc -m32 -Wall -O0 -nostdinc  -c src/bootselector.c
#ld -Ttext 0x1000 -e 0x1000 -o kernel.o --oformat=binary
ld -nostdlib -m elf_i386 -T src/raw_binary.lds bootselector.o kernel2.o -o kernel.o
#ld -T src/raw_binary.lds kernel2.o bootselector.o -o kernel.o
objcopy -O binary kernel.o loader.bin
rm -rf /media/floppy0/loader.bin
cp loader.bin /media/floppy0/loader.bin
#cp kernel.o /media/floppy0/loader.bin

scons -f ./compile_boot_write.py -c 
scons -f ./compile_boot_write.py 
#./boot_writer /dev/fd0u1440
./boot_writer /dev/fd0


#cp kernel.o /mnt/floppy/loader.bin

